try:
    import paramiko
except:
    pass
import sys
print "*"*45
print "Simple SSH client"
print "Made by: lexelEZ[at]gmail[dot]com"
print "*"*45
import paramiko
#Creamos un objeto con la funcion de SSHClient
ssh = paramiko.SSHClient()

ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())#Se encarga de del problema de las llaves
Host= raw_input("Enter the host: ")
Username = raw_input("Enter the username: ")
Password = raw_input("Enter the password: ")
try:
    ssh.connect(Host, username=Username, password=Password)
    print "Succesfuly conected to host:", Host
except:
    print "There was and error with the connection"
    sys.exit(1)
print"Dont use sudo commands please!"
while True:
    
    cmd = raw_input(Username+"@"+Host+"$ ")
    try:
        if cmd == "quit":
            ssh.close()
            print "Succesfully closed the conection!"
            sys.exit(1)
        inpput,output,error = ssh.exec_command(cmd)
        for line in output.read().splitlines():
            print line
        
            
    except:
        print "There was an Error with the Program please try again!"
        print out.readlines()
        sys.exit(1)
        
